//
//  SocketAckEmitter.m
//  Socket.IO-Client
//
//  Created by alanwang.dev on 16/8/8.
//  Copyright © 2016年 com.alanwang.dev. All rights reserved.
//

#import "SocketAckEmitter.h"
#import "SocketIOClient.h"
@implementation SocketAckEmitter

- (instancetype)initWithSocket:(SocketIOClient *)socket andAckNum:(NSInteger)ackNum
{
    if (self = [super init]) {
        self.socket = socket;
        self.ackNum = ackNum;
    }
    return self;
}

- (void)with:(NSMutableArray *)items
{
    if (self.ackNum == -1)
        return;
    [self.socket emitAck:self.ackNum items:items];
}

@end
